<!Doctype html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="style/pcpush.css">
		<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
	</head>
	<body>


		<script type="text/javascript">
	function init () {
		//在mini版及完整版中，当用户第一次点击安装时，弹出隔空的新手引导窗，只在用户第一次点击时弹出，后续不再弹。点击【我知道了】或关闭按钮，都是关闭窗口。
		// var isMini4 = $.ML.util.isMini4() || (typeof($.ML.util.getCookie("cver")) == "undefined");//是否mini4
		// var isNewFish = isMini4 && !localStorage.getItem("firstPcpushGuide");
		// console.log(isNewFish);
		if(true){
			var $pcpushGuide = $("#J_PcpushGuide");
			if(!$pcpushGuide[0]){
				var newFishHtml = '';
				newFishHtml += '<div id="J_PcpushGuide" class="pcPushGuideCss3 J_Mod" data-modname="pcpushGuide">';
				newFishHtml += '<div class="intro_bg"><div class="music_mask"></div><div id="i_konw" class="first"><a href="javascript:;" class="i_konw"></a></div><div id="screen" class="screen"><a class="close">&times;</a><div id="step1" class=""><div class="w1"></div><div class="w2"></div><div class="w3"><div class="w31"></div><div class="w14"></div></div></div><div id="step2" class=""><div class="w5"><div class="w51"></div><div class="w5_inner"><div class="w52"></div><div class="w53"></div><div class="w54"><div class="w54_bar"><div class="w54_num">100%</div></div></div></div></div></div><div id="step3" class=""><div class="w6"></div><div class="w7">立即体验</div></div></div></div>';
				newFishHtml += '</div>';
				$("body").append(newFishHtml);
			}else{
				$("#J_PcpushGuide").fadeIn();
			}

			var m_intro = {
				init : function(){
					var step1 = document.querySelector('#step1');
					var step2 = document.querySelector('#step2');
					var step3 = document.querySelector('#step3');
					var i_konw = document.querySelector('#i_konw');
					var btn_i_konw = document.querySelector('#i_konw .i_konw');
					var btn_close = document.querySelector('.close');
					var btn_begin = document.querySelector('.w7');
					var intro_bg = document.querySelector('.intro_bg');
					var btn_step1 = document.querySelector('.w31');
					var music_mask = document.querySelector('.music_mask');
					var t1, t2;  //时间函数
					
					//关闭按钮
					btn_close.addEventListener("click", close_intro, false);
					btn_begin.addEventListener("click", close_intro, false);
					function close_intro(){
						music_mask.style.display = 'none';
						$("#J_PcpushGuide").css("display", "none");
						intro_bg.className = 'intro_bg intro_bg_hide';
						// localStorage.setItem("firstPcpushGuide", "true");
						clearTimeout(t1);
						clearTimeout(t2);
					}
					//我知道了按钮，关闭图片，开始动画
					btn_i_konw.addEventListener("click", function() {
						i_konw.style.display = 'none';
						step1.className = 'step1';
						t1 = setTimeout(function() {
							step1.className = '';
							step2.className = 'step2';
						}, 15000);
						t2 = setTimeout(function() {
							step3.className = 'step3';
							step2.className = '';
						}, 32000);
					}, false);

					//安装到手机按钮，点击了就用重新计算时间
					btn_step1.addEventListener("click", function() {
						clearTimeout(t1);
						clearTimeout(t2);
						step1.className = '';
						step2.className = 'step2';
						setTimeout(function() {
							step3.className = 'step3';
							step2.className = '';
						}, 17000);
						
					}, false);

				}
			}
			
			m_intro.init();
		}
	}
	init();
		</script>
		
	</body>
</html>
